Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper concurrency support in websockets mode #1036

Merged
merged 6 commits into from
Oct 20, 2024

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented Oct 16, 2024

This follows up from #1027 and it reuses the same Context instance for an entire session (i.e. websockets connection). This fixes the edge case in #1028 because the component diffing bug is fixed. See new test case which covers this.

I've extracted the environmental variables from server/server_utils.py into a separate package env to avoid cyclic dependencies since many packages like runtime may want to depend on env.

@wwwillchen wwwillchen requested a review from richard-to October 18, 2024 06:05
@wwwillchen wwwillchen marked this pull request as ready for review October 18, 2024 06:05
Copy link
Collaborator

@richard-to richard-to left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Think I only had one question I was unsure of in the code.

mesop/runtime/runtime.py Show resolved Hide resolved
@wwwillchen wwwillchen merged commit 3714bd5 into google:main Oct 20, 2024
3 checks passed
@wwwillchen wwwillchen deleted the websockets-lock branch October 20, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants